package com.hd.manager.task.StudentInfotask;

import com.hd.appcommon.dd.api.UserinfoAPI;
import com.taobao.api.ApiException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class DdInfoTask {
    @Autowired
    private SensitiveMessageTask sensitiveMessageTask;
    @Autowired
    private UserinfoAPI userinfoAPI;
    @Autowired
    private AcademicAffairOfficeInfoInterface academicAffairOfficeInfoInterface;
    public void getUserInfo() throws ApiException {
        //先添加教务处的信息
        // TODO 根据数据源分类task优化数据拉取效率
        sensitiveMessageTask.syncTeachersIDCard();
        sensitiveMessageTask.syncStudentsIDCard();
        //再更新钉钉信息
        userinfoAPI.getAllInfo();
        // 更新学生表信息
        // 优化更新数据库效率
        academicAffairOfficeInfoInterface.getInfo();
    }
}
